<?php
namespace app\common\model;

use think\Model;

class MessageDetail extends Model
{
    protected $connection = 'db_config_aiqi';
    protected $table = 'tab_customer_detail';
    // 定义与Message的多对一关联
    public function message()
    {
        // belongsTo('关联模型名', '外键名', '主键名', ['模型别名定义']);
        return $this->belongsTo('Message', 'customer_id', 'id')->where(["status"=>0,'type'=>0]);
    }
}